/**
 * 
 */
package Domain;
import java.util.*;
/**
 * @author gth854p
 *
 */
public class RE_CharCommand implements RuleCommand {
	private Set<String> ruleSet;
	
	private String name,value;
	public RE_CharCommand()
	{
		/*char[] temp;
		ruleSet = new HashSet<String>();
		this.name = "RE_CHAR";
		for(int i = 33;i<127;i++)
		{
			
			if(i==92||i==42||i==91||i==93||i==43||i==63||i==40||i==41||i==124||i==34||i==39)
				{
					temp = new char[2];
					temp[0] = '\\';
					temp[1] = (char) i;
				}
			else
			{
				temp  = new char[1];
				temp[0] = (char) i;
			}
			
			ruleSet.add(new String(temp));
		}*/
		
	}
	public RE_CharCommand(String value)
	{
		this.setValue(value);
		this.setName("RE_CHARCOMMAND");
	}
	
	/* (non-Javadoc)
	 * @see Domain.RuleCommand#checkSyntax(java.lang.String)
	 */
	@Override
	public boolean checkSyntax(String compare) {
		// TODO Auto-generated method stub
		return false;
	}

	/* (non-Javadoc)
	 * @see Domain.RuleCommand#checkCorrectness(java.lang.String)
	 */
	@Override
	public boolean checkCorrectness(String compare) {
		return ruleSet.contains(compare);
	}

	/* (non-Javadoc)
	 * @see Domain.RuleCommand#createNFA()
	 */
	@Override
	public NFADiagram createNFA() {
		System.out.println("RE_CHARCOMMAND");
		return new NFADiagram();
	}

	@Override
	public Set<String> getRuleSet() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setRuleSet(Set<String> set) {
		// TODO Auto-generated method stub
		
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return name;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public String getValue() {
		return value;
	}
	public String toString()
	{
		return name+value;
	}
}
